package com.gzsxy.excel.constants;

/**
 * @Author
 * @Description //TODO
 * @Date 2022/01/18
 * @Param $
 * @return $
 **/
public class sysRoleConstants {
    public enum RoleEu{

        /**
         * JOB
         */
        ADMIN("管理员","1"),
        /**
         * Resignation
         */
        FIRST("研发第一负责人","2"),
        /**
         *  Compensatory
         */
        SECOND("研发第二负责人","3"),
        /**
         * OTHER
         */
        WORKER("研发人员","4");

        private String value;
        private String name;
        RoleEu(String name,String value) {
            this.value = value;
            this.name = name;
        }

        public static String getNameByValue(String value) {
            for (RoleEu t : RoleEu.values()) {
                if (t.getValue().equals(value)) {
                    return t.getName();
                }
            }
            return null;
        }

        public static String getValueByName(String name) {
            for (RoleEu t : RoleEu.values()) {
                if (t.getName().equals(name)) {
                    return t.getValue();
                }
            }
            return null;
        }

        public String getValue() {
            return this.value;
        }

        public String getName() {
            return this.name;
        }
    }
}
